<?php

$pattern = '#ti#';
$str = 'information';

//在str中匹配ti,找到就成功
if (preg_match($pattern,$str,$matches)){
    echo 'suc';
    var_dump($matches);
}else{
    echo 'fail';
}

